package designpattern.facade;

public class SysFacade {
    private final AuthService authService;
    private final SsoService ssoService;
    private final UserService userService;
    private final BusinessService businessService;

    public SysFacade(){
        this.authService = new AuthService();
        this.ssoService = new SsoService();
        this.userService = new UserService();
        this.businessService = new BusinessService();
    }

    public Result auth(String token){
        return authService.auth(token);
    }

    public Result ssoLogin(String token){
        return ssoService.ssoLogin(token);
    }

    public Result userInfo(String token){
        return userService.userInfo(token);
    }

    public Result saveOrder(Order order){
        return businessService.save(order);
    }

    public Result queryById(String id){
        return businessService.query(id);
    }
}
